﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;

/// <summary>
/// Class fgWeb helper
/// </summary>
public class fgWeb
{

    /// <summary>
    /// Determines whether [is URL hacking] [the specified URL referrer].
    /// </summary>
    /// <param name="urlReferrer">The URL referrer.</param>
    /// <returns>
    ///   <c>true</c> if [is URL hacking] [the specified URL referrer]; otherwise, <c>false</c>.
    /// </returns>
    public static bool IsUrlHacking(System.Web.HttpRequest urlReferrer)
    {
        string PName = "";
        if (urlReferrer.UrlReferrer != null)
        {
            PName = urlReferrer.UrlReferrer.Segments[urlReferrer.UrlReferrer.Segments.Length - 1];
        }

        if (string.IsNullOrEmpty(PName))
        {
            return true;
        }

        return false;

    }

}

